package com.example.logindb.sevices;

import com.example.logindb.dto.UserDTO;
import com.example.logindb.entity.User;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.List;
import java.util.Map;
import java.util.Optional;

public interface UserService {

    void saveUser(UserDTO userDTO);
    void deleteUserById(int id);
    void updateUser(UserDTO userDTO);

    UserDTO findById(int id);
    User findByUsername(String username);
    List<UserDTO> findAllByRole(String role);
    List<UserDTO> searchUser(String role,String name);

    boolean isExists(String email);

    User getUserbyphone(String userPhone);

    User edit(UserDTO user);

    int countByUserrole(String role);

    List<User> findUsersByBlindids(List<Integer> blindids);

    User getUser(Integer userId);

    Optional<User> ifpresent(int gId);

    Integer blindNumber(String blind);

    List<Map<String, Object>> getUserLocations();

    Page<User> searchUser2(String user, String name, Pageable pageable);

    User findAllById(int id);

    Page<User> searchBlinds(Pageable pageable);

    Page<User> searchVolunterrs(Pageable pageable);

    Page<User> searchGuardians(Pageable pageable);

    Object getCount();

//    PageInfo<User> selectAll(String name, int pageNum, int i);
    //**************

//    User getUser(Integer user_id);
//    User getUserbyphone(String phone);
//    List<User> getUsersbyPhone(String phone);
//    User edit(UserDTO user);
}
